/**
 * Created by kangli on 2018/3/1.
 */

var account =sessionStorage.getItem("account") ;
var type = JSON.parse(sessionStorage.getItem("type1")) || 0;
$(window).resize(function(){
    nav_Scroll();//导航滚动
    iframe_changeSize();//iframe窗口变化
});

function nav_Scroll(){
    $(".page-sidebar-menu").css("height",$(window).height()-$('.menu-top').height()-55);
}
function iframe_changeSize(){
    $("iframe").css("height",$(window).height()-$(".in-topBar").height()-10);
}
$(function(){
  /*  console.log(account)*/
    $(".account").text(account)
    nav_Scroll();
    iframe_changeSize();

    $("#chooseTest").children('option').eq(type).attr("selected","selected");
    if(type=="0"||type=="1"||type=="2"||type=="3"){
        parent.$(".changeTest").attr("href","../poolMana/poolYjskc.html");
    }else if(type=="4"){
        parent.$(".changeTest").attr("href","../poolMana/poolGgzyk.html");
    }else if(type=="5"){
        parent.$(".changeTest").attr("href","../poolMana/poolZjjs.html");
    }else if(type=="6"){
        parent.$(".changeTest").attr("href","../poolMana/poolYjskc.html");
    }

    $(".dropdown-toggle1").click(function(){
        $(this).next().slideToggle(500);
    })
    $(".dropdown-menu1").find("li").click(function(){
        /*console.log(  $(this).parent().parent());*/
        $(".oneactive").removeClass("oneactive");
        $(".dropdown-menu1").find("li").removeClass("active");
        $(this).addClass("active");
})
})
//公告管理点击
function oneNavClick(btn){
     $(".oneactive").removeClass("oneactive");
       $(btn).addClass("oneactive");
    $(".dropdown-menu1").find("li").removeClass("active");
}